<#include "macro_.ftl">
package ${packageCode}.${moduleMapperKey}.dao;

import java.util.List;
import java.util.Map;

import com.fand.dto.PaginationDto;
<#list poMapperList as poMapper>
import ${packageCode}.${moduleMapperKey}.dto.${poMapper.code}Dto;
</#list>

/**
 * ${businessMapper.name!businessCode}
 *
 * @author ${author!'yaoHT'}
 * 
 */
public interface ${businessCode}Dao {
	String BEAN_ID = "${packageCode}.${moduleMapperKey}.dao.${businessCode}Dao";
<#list poMapperList as poMapper>

	/**
	 * 插入:${poMapper.remarks!poMapper.code}
	 * 
	 * @param insert${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @param insertProperties
	 *            插入属性名集合
	 * 
	 * @return 影响行数
	 */
	int insert${poMapper.code}By1(${poMapper.code}Dto insert${poMapper.code}, String... insertProperties);
<#if poMapper.markService>

	/**
	 * 插入:${poMapper.remarks!poMapper.code}
	 * 
	 * @param insert${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return 影响行数
	 */
	int insert${poMapper.code}By1_1(${poMapper.code}Dto insert${poMapper.code});

	/**
	 * 插入:${poMapper.remarks!poMapper.code}
	 * 
	 * @param insert${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return 影响行数
	 */
	int insert${poMapper.code}By2(${poMapper.code}Dto insert${poMapper.code});
</#if>
	
	/**
	 * 删除:${poMapper.remarks!poMapper.code}
	 * 
	 * @param delete${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @param whereEqProperties
	 *            条件为等于的属性名集合
	 * 
	 * @return 影响行数
	 */
	int delete${poMapper.code}By1(${poMapper.code}Dto delete${poMapper.code}, String... whereEqProperties);

<#if poMapper.markService>
	/**
	 * 删除:${poMapper.remarks!poMapper.code}
	 * 
	 * @param delete${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return 影响行数
	 */
	int delete${poMapper.code}By1_1(${poMapper.code}Dto delete${poMapper.code});
	
	/**
	 * 删除:${poMapper.remarks!poMapper.code}
	 * 
	 * @param delete${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return 影响行数
	 */
	int delete${poMapper.code}ByIds(${poMapper.code}Dto delete${poMapper.code});
</#if>

	/**
	 * 更新:${poMapper.remarks!poMapper.code}
	 * 
	 * @param update${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @param updateProperties
	 *            更新的属性名集合
	 * 
	 * @param whereEqProperties
	 *            条件为等于的属性名集合
	 * 
	 * @return 影响行数
	 */
	int update${poMapper.code}By1(${poMapper.code}Dto update${poMapper.code}, String[] updateProperties, String... whereEqProperties);

<#if poMapper.markService>
	/**
	 * 更新:${poMapper.remarks!poMapper.code}
	 * 
	 * @param update${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return 影响行数
	 */
	int update${poMapper.code}By1_1(${poMapper.code}Dto update${poMapper.code});
	
	/**
	 * 更新:${poMapper.remarks!poMapper.code}
	 * 
	 * @param update${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return 影响行数
	 */
	int update${poMapper.code}By2(${poMapper.code}Dto update${poMapper.code});
</#if>

	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param requiredType
	 *            返回类型
	 * 
	 * @param select${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @param objectId
	 *            返回对象标识
	 * 
	 * @param whereEqProperties
	 *            条件为等于的属性名集合
	 * 
	 * @return 返回对象
	 */
	<R> R select${poMapper.code}By1ForObject(Class<R> requiredType, ${poMapper.code}Dto select${poMapper.code}, String objectId, String... whereEqProperties);
<#if poMapper.markService>

	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param requiredType
	 *            返回类型
	 * 
	 * @param select${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @param objectId
	 *            返回对象标识
	 * 
	 * @return 返回对象
	 */
	<R> R select${poMapper.code}By1_1ForObject(Class<R> requiredType, ${poMapper.code}Dto select${poMapper.code}, String objectId);
	
	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param requiredType
	 *            返回类型
	 * 
	 * @param select${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @param objectId
	 *            返回对象标识
	 * 
	 * @return 返回对象
	 */
	<R> R select${poMapper.code}By2ForObject(Class<R> requiredType, ${poMapper.code}Dto select${poMapper.code}, String objectId);
</#if>
	
	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param requiredType
	 *            返回类型
	 * 
	 * @param select${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @param objectId
	 *            返回对象标识
	 * 
	 * @param whereEqProperties
	 *            条件为等于的属性名集合
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象集合
	 */
	<R> List<R> select${poMapper.code}By1ForObjectList(Class<R> requiredType, ${poMapper.code}Dto select${poMapper.code}, String objectId, String... whereEqProperties);

<#if poMapper.markService>
	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param requiredType
	 *            返回类型
	 * 
	 * @param select${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @param objectId
	 *            返回对象标识
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象集合
	 */
	<R> List<R> select${poMapper.code}By1_1ForObjectList(Class<R> requiredType, ${poMapper.code}Dto select${poMapper.code}, String objectId);
	
	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param requiredType
	 *            返回类型
	 * 
	 * @param select${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @param objectId
	 *            返回对象标识
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象集合
	 */
	<R> List<R> select${poMapper.code}By2ForObjectList(Class<R> requiredType, ${poMapper.code}Dto select${poMapper.code}, String objectId);
</#if>

	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param mappedClass
	 *            返回类型
	 * 
	 * @param select${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @param selectProperties
	 *            查询的属性名集合
	 * 
	 * @param whereEqProperties
	 *            条件为等于的属性名集合
	 * 
	 * @return 返回对象
	 */
	<R> R select${poMapper.code}By1ForMappedObject(Class<R> mappedClass, ${poMapper.code}Dto select${poMapper.code}, String[] selectProperties, String... whereEqProperties);
<#if poMapper.markService>

	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param mappedClass
	 *            返回类型
	 * 
	 * @param select${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return 返回对象
	 */
	<R> R select${poMapper.code}By1_1ForMappedObject(Class<R> mappedClass, ${poMapper.code}Dto select${poMapper.code});
	
	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param mappedClass
	 *            返回类型
	 * 
	 * @param select${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return 返回对象
	 */
	<R> R select${poMapper.code}By2ForMappedObject(Class<R> mappedClass, ${poMapper.code}Dto select${poMapper.code});

	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param select${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * @return 返回数据
	 */
	int select${poMapper.code}ByCodeNqIdForInteger(${poMapper.code}Dto select${poMapper.code});
</#if>

	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param mappedClass
	 *            返回类型
	 * 
	 * @param select${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @param selectProperties
	 *            查询的属性名集合
	 * 
	 * @param whereEqProperties
	 *            条件为等于的属性名集合
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象集合
	 */
	<R> List<R> select${poMapper.code}By1ForMappedObjectList(Class<R> mappedClass, ${poMapper.code}Dto select${poMapper.code}, String[] selectProperties, String... whereEqProperties);
<#if poMapper.markService>

	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param mappedClass
	 *            返回类型
	 * 
	 * @param select${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象集合
	 */
	<R> List<R> select${poMapper.code}By1_1ForMappedObjectList(Class<R> mappedClass, ${poMapper.code}Dto select${poMapper.code});

	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param mappedClass
	 *            返回类型
	 * 
	 * @param select${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象集合
	 */
	<R> List<R> select${poMapper.code}By2ForMappedObjectList(Class<R> mappedClass, ${poMapper.code}Dto select${poMapper.code});
	
	/**
	 * 分页:${poMapper.remarks!poMapper.code}
	 * 
	 * @param mappedClass
	 *            返回类型
	 * 
	 * @param pagination${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}分页对象
	 */
	<R> PaginationDto<R> pagination${poMapper.code}By1ForMappedObjectList(final Class<R> mappedClass,
			${poMapper.code}Dto pagination${poMapper.code});
			
	/**
	 * 分页
	 * 
	 * @param pagination${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}分页对象
	 */
	PaginationDto<Map<String, Object>> pagination${poMapper.code}By1ForMapList(${poMapper.code}Dto pagination${poMapper.code});
</#if>
</#list>
}